import { Drawer as ADrawer } from 'antd';
import { FC, ReactNode } from 'react';

interface PropsType {
  title: string;
  open: boolean;
  onClose: () => void;
  children: ReactNode;
}

const Drawer: FC<PropsType> = (props) => {
  return (
    <ADrawer
      title={props.title}
      placement="right"
      onClose={props.onClose}
      open={props.open}
    >
      {props.children}
    </ADrawer>
  );
};

export default Drawer;
